@echo off
cd /d %~dp0

if exist out rmdir /s /q out

javac --module-path "D:\openjfx-24.0.1_windows-x64_bin-sdk\javafx-sdk-24.0.1\lib" --add-modules javafx.base,javafx.graphics,javafx.controls,javafx.fxml -encoding UTF-8 -d out -cp mint2tcp;resources module-info.java mint2tcp\*.java

if %ERRORLEVEL% neq 0 (
    echo 编译失败，请检查错误！
    pause
    exit /b 1
)

REM 运行程序
java --module-path "D:\openjfx-24.0.1_windows-x64_bin-sdk\javafx-sdk-24.0.1\lib;out;resources" --add-modules javafx.base,javafx.graphics,javafx.controls,javafx.fxml -cp out;resources mint2tcp.MainApp

pause